home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4507 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: crchh327.rich.bnr.ca!jobell
  2. From: jobell@bnr.ca (Bret Bieghler)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: why is dat ?
  5. Date: 30 Jan 1996 16:46:22 GMT
  6. Organization: Bell-Northern Research Ltd.
  7. Message-ID: <4eli0u$ipc@crchh327.rich.bnr.ca>
  8. References: <310DCC58.798E@pergamon.isar.de>
  9. NNTP-Posting-Host: crchh524.rich.bnr.ca
  10.  
  11. In article <310DCC58.798E@pergamon.isar.de>,
  12. Gerson Kurz  <dekonstruktor@pergamon.isar.de> wrote:
  13. >hi guys, this is my first msg here so I don't know if this has 
  14. >been answered 10^50 times before but here it goes:
  15. >
  16. >class A {};
  17. >class B : public A {};
  18. >
  19. >B* pointer_to_B;
  20. >A** pointer_to_pointer_to_A = &pointer_to_B;
  21. >
  22. >will result in an error (using MSVC40, wl4) headed "improved
  23. >ansi comp."
  24. >
  25. >why is dat ? (boogie down productions, 1989)
  26.  
  27. A** is not &B, it is a pointer to any A*.
  28.  
  29. pointers to pointers are also known as handles, commonly used
  30. for avoiding losing your data during heap compactions.
  31.  
  32. JB
  33.  
  34. -- 
  35. Joseph A. Bell (NOT Bret Bieghler) jobell@bnr.ca
  36. Northern Telecom / Bell-Northern Research
  37. "What?  Evacuate now, in our moment of triumph?  Surely you overestimate their chances."
  38.